package com.example.administrator.dc.model;

import com.example.administrator.dc.Service.FollowService;
import com.example.administrator.dc.Service.UserService;

import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by Administrator on 2017/8/24.
 */

public class FollowModel {
    private Retrofit retrofit;
    public FollowModel(){
        retrofit=new Retrofit.Builder()
                .addConverterFactory(GsonConverterFactory.create())
                .baseUrl(Contants.BASE_URL1)
                .build();
    }
    //判断是否关注
    public Call isFollow(String userid,String followid)
    {
        FollowService service=retrofit.create(FollowService.class);
        return service.isfollow(userid,followid);

    }

    //g关注
    public Call follow(String userid,String followid)
    {
        FollowService service=retrofit.create(FollowService.class);
        return service.follow(userid,followid);

    }

    //取消关注
    public Call cancelFollow(String userid,String followid)
    {
        FollowService service=retrofit.create(FollowService.class);
        return service.cancelfollow(userid,followid);

    }
    //我的关注
    public Call Followlist(String userid)
    {
        UserService service=retrofit.create(UserService.class);
        return service.followlist(userid);
    }
}
